<form action="{:U('Show/add')}" method="post">
    <label for="iname">sdas </label>
    <input type="text" name="name" id="iname">
    <br>
    <br>
    <label for="ipwd">怒那</label>
    <input type="password" name="pwd" id="ipwd" >
    <br>
    <input  id="send_btn"  type="button" value="提交">
</form>





        <table id="dg" title="My Users" class="easyui-datagrid" style="width:550px;height:250px"
               url="{:U('Show/Get')}"
               toolbar="#toolbar"
               rownumbers="true" fitColumns="true" singleSelect="true">
            <thead>
            <tr>
                <th field="Id" width="50">First Name</th>
                <th field="username" width="50">Last Name</th>
                <th field="content" width="50">Phone</th>
                <th field="time" width="50">Email</th>
            </tr>
            </thead>
        </table>


<script type="application/javascript">
    $('#send_btn').click(function () {
        var username=$('#iname');
        var content=$('#ipwd');

     $.post("{:U('Show/add')}",{username:username.val(),content:content.val()},function (data) {
         alert('添加成功');
         $('#dg').datagrid('reload');


     },'json')
        }

    )
</script>

